package com.xingda.packing.minitor.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xingda.packing.enums.ActionType;
import com.xingda.packing.events.dto.*;
import com.xingda.packing.minitor.entity.PkAction;

/**
 * <p>
 * 服务类
 * </p>
 */
public interface IPkActionService extends IService<PkAction> {
    void addPkAction(EventActionScanCode actionScanCode);

    void addPkAction(EventActionPacking actionPacking);

    void addPkAction(EventActionStorage actionStorage);

    void addPkAction(EventActionCachePacking actionCachePacking);

    /**
     * 机器人自动完成时，根据任务类型查询最后一条未完成动作指令
     */
    void finishPkAction(EventActionType eventActionType);

    void finishPkAction(ActionType actionType, int area);


    /**
     * @param actionType  动作类型
     * @param finishState 完成状态
     * @param current     页码
     * @param size        每页显示条数
     */
    IPage<PkAction> getList(Integer actionType, Integer finishState, Integer area, Long current, Long size);

    /**
     * @param id          动作ID
     * @param finishState 完成状态
     */
    void modifyById(Integer id, Integer finishState);
}
